package com.example;

import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@ConditionalOnProperty(value = "per.enable", havingValue = "true")
@EnableConfigurationProperties(PProperties.class)
public class AutoConfiguration {
    @Bean
    //@ConditionalOnMissingBean(LoginInterceptor.class)
    @ConditionalOnBean(LoginInterceptor.class)
    public Object object() {
        return new Object();
    }
}
